-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied #20067
fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied #20067
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20067 +/- ##
========================================
Coverage 66.28% 66.29%
========================================
Files 1712 1714 +2
Lines 63968 64116 +148
Branches 6731 6796 +65
========================================
+ Hits 42404 42506 +102
- Misses 19853 19879 +26
- Partials 1711 1731 +20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for the fix! It looks like the codecov didn't pass, so I'm guessing we might need to add some branch tests for this function. |
Thanks for tagging me Ville! My fix doesn't cover the scenario presented by @Gwitchr, so I think this should go in. |
Also, it would be great to implement binary search for optimal font size instead of decrementing by 1 to improve performance, but that's definitely out of scope of this PR 🙂 Anyway, if the proposal from comment above is not viable or would require a large refactor, let's merge this fix (which is great!) and iterate on this later |
Replaced by #20173 |
SUMMARY
adding custom CSS to a dashboard with a bigInt chart would activate a while loop that didn't ever finished, which somehow wasn't caught by the surrounding ErrorBoundary cause the whole app crashed before running out of memory (my guess)
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-05-13.at.17.04.16.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION